<template>
	<view style="page">
		<image @click="back" class="back" src="../../static/wdyy.png" mode=""></image>
		<image class="bg" src="../../static/wdyybg.png" mode=""></image>
		<!-- <navigator url="../user/Invitation_Record" class="Invitation"> -->
		<navigator url="/pages/agent/team/team?appId=10002" class="Invitation">
			邀约记录
		</navigator>
		<view class="ewm">
			<image :src="qrcode_url" mode="" class="ewm_image"></image>
		</view>
		<view class="yqm">
			邀请码：{{user.salt}}
		</view>
		<view class="yqr">
			邀请人：{{user.nickName}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				qrcode_url: '',
				user: uni.getStorageSync('userData'),
			}
		},

		onShow() {
			this.getData();
		},
		methods: {
			back() {
				uni.navigateBack()
			},
			/*获取数据*/
			getData() {
				let that = this;
				uni.showLoading({
					title: '加载中',
				});
				let source = that.getPlatform();
				that._get('plus/agent/qrcode/poster', {
					source: source
				}, function(res) {
					uni.hideLoading();
					that.qrcode_url = res.data;
				});
			}
		}
	}
</script>


<style lang="scss" scoped>
	.page {
		position: relative;
		width: 100vw;
		height: 100vh;
	}

	.back {
		width: 21rpx;
		height: 31rpx;
		position: absolute;
		/* #ifndef H5 */
		top: 120rpx;
		/* #endif */
		/* #ifdef H5 */
		top: 44rpx;
		/* #endif */
		left: 33rpx;
		z-index: 999;
	}

	.bg {
		width: 750rpx;
		height: 1200rpx;
		position: absolute;
		top: 0;
		left: 0;
	}

	.Invitation {
		text-align: center;
		width: 135rpx;
		height: 40rpx;
		line-height: 40rpx;
		background: rgba(255, 255, 255, 0.3);
		border-radius: 20rpx;
		border: 1px solid #FFFFFF;
		font-weight: 400;
		font-size: 24rpx;
		color: #FFFFFF;
		position: absolute;
		/* #ifndef H5 */
		top: 116rpx;
		/* #endif */
		/* #ifdef H5 */
		top: 44rpx;
		/* #endif */
		right: 25rpx;
	}

	.ewm {
		width: 250rpx;
		height: 250rpx;
		background: #D3D3D3;
		position: absolute;
		top: 704rpx;
		left: 250rpx;

		.ewm_image {
			width: 250rpx;
			height: 250rpx;
		}
	}

	.yqm {
		text-align: center;
		width: 350rpx;
		height: 60rpx;
		line-height: 60rpx;
		background: linear-gradient(-90deg, rgba(255, 67, 95, 0.99), rgba(255, 164, 77, 0.99));
		border-radius: 30rpx;
		position: absolute;
		top: 1014rpx;
		left: 200rpx;
		font-weight: 400;
		font-size: 32rpx;
		color: #FFFFFF;
	}

	.yqr {
		position: absolute;
		top: 1120rpx;
		left: 50%;
		width: 210px;
		font-weight: 400;
		font-size: 32rpx;
		color: #333333;
		transform: translate(-50%, -50%);
	}
</style>